﻿using System;
using System.Collections.Generic;
using System.Text;

namespace T.FAS.Runtime.DataAccess.Common
{
    /// <summary>
    /// 统一数据访问服务常量类
    /// </summary>
    public class DACConst
    {
        /// <summary>
        /// 低代码默认列权限功能项id
        /// </summary>
        public const string FASColumnPermissionFuncID = "5E6A90D4-1C94-4C6D-9F6D-D15FA2ACD2B1";
        /// <summary>
        /// 低代码线程上下文时间戳key
        /// </summary>
        public const string FAS_Timestamp = "FAS_Timestamp";
        /// <summary>
        /// 低代码线程上下文时间戳使用的format格式
        /// </summary>
        public const string FAS_TimestampFormat = "yyyy-MM-dd HH:mm:ss.fff";
        /// <summary>
        /// 低代码线程上下文是否校验CDO的引用类型数据（SDO\DO)key
        /// </summary>
        public const string FAS_IsCheckRefFields = "FAS_CheckRefFields";
        /// <summary>
        /// DQ掩码参数名称，同时作为CDO的额外参数key
        /// </summary>
        public const string ExtSetting = "ExtSetting";
        /// <summary>
        /// 国际化I18N Code key
        /// </summary>
        public const string I18NCode = "I18NCode";
        /// <summary>
        /// 控制上下文常量值
        /// </summary>
        public class DACControlContextConst
        {
            public const string Timeout = "Timeout";
        }

        public class CDO
        {
            /// <summary>
            /// 是否支持批量更新
            /// </summary>
            public const string IsBatchUpdate = "IsBatchUpdate";
            public const string IsI18NVal = "IsI18NVal";
        }

        public class DQ
        {
            /// <summary>
            /// 高级查询参数
            /// </summary>
            public const string AdvancedFilterString = "AdvancedFilter";
            /// <summary>
            /// 高级排序参数
            /// </summary>
            public const string AdvancedSortString = "AdvancedSort";
            /// <summary>
            /// 默认过滤参数
            /// </summary>
            public const string DefaultInputString = "DefaultInputFilter";
        }

        /// <summary>
        /// 扩展参数key列表
        /// </summary>
        public class ExtParamSwitch
        {
            /// <summary>
            /// 控制是否校验CDO的引用类型数据（SDO\DO)
            /// </summary>
            public const string IsCheckRefObject = "IsCheckRefObject";
            /// <summary>
            /// 目标语言列表
            /// </summary>
            public const string TargetLanguageList = "TargetLanguageList";

            /// <summary>
            /// 国际化模式
            /// </summary>
            public const string InternationalMode = "InternationalMode";
        }
    }

    /// <summary>
    /// 插件固定key
    /// </summary>
    public class PluginConst
    {
        public class StateMachine
        {
            public const string Code = "StateMachinePlugin";
            public const string BeforeSavedData = "BeforeSavedData";
            public const string CurrentRuleReadonlyFields = "CurrentRuleReadonlyFields";
        }

        public class ChangeLog
        {
            public const string Code = "ChangeLogPlugin";
            public const string ChangeSet = "ChangeSet";
            public const string DeleteRecord = "DeleteRecord";
        }
    }
}
